<template>
  <div>
    <div>
      name:
      <input type="text" v-model="createForm.name" />
      age:
      <input type="text" v-model="createForm.age" />
      <input type="button" value="添加" @click="createUser()" />
    </div>
    <div v-for="item in list" :key="item.id">
      <div>
        <span>{{item.name}}</span>
        <span>{{item.age}}</span>
      </div>
    </div>
  </div>
</template>

<script>
// import {create,getAll}  from '../../../lowdb/service/student'
const create = require('../../../lowdb/service/student')
console.log(create)
export default {
  data() {
    return {
      createForm: {
        name: "",
        age: "",
      },
    };
  },
  mounted(){
    // this.getStudent();
  },
  methods:{
    // createUser(){
    //   let user = this.createForm();
    //   create(user);
    //   // this.getStudent();
    // },
    // getStudent(){
    //   this.list = getAll();
    // }
  }
};
</script>

<style lang="scss" scoped>
</style>